import { SensorsCrossCounts, SetSensorsCrossCounts } from 'store';

export const onSetSensorCrossCounts = (
  _: SensorsCrossCounts,
  {
    channelNumber,
    sequenceNumber,
  }: SetSensorsCrossCounts,
): SensorsCrossCounts => ({
  ...(channelNumber === 3 && { crossCount2: sequenceNumber }),
  ...(channelNumber === 2 && { crossCount3: sequenceNumber }),
});

